package io.xxx.mario.task.talk;

import io.xxx.mario.robot.Robot;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class TalkerFactory {

    public GenericTalker getTalker(TalkerType talkerType, Robot robot) {
        switch (talkerType) {
            case IPAD -> {
                return new IPadTalker(robot);
            }
            case APP -> {
                return new AppTalker(robot);
            }
            default -> throw new RuntimeException();
        }
    }
}
